package com.woniu.command.matcommand;

import com.woniu.command.Command;
import com.woniu.command.handler.MatCommandHandler;
import com.woniu.outlet.po.MaterialApplication;
import com.woniu.util.ApplicationContextHolder;

public class DelMatCommand implements Command<Integer> {
    private MatCommandHandler handler;

    public DelMatCommand ( ) {
        //ApplicationContextHolder.getApplicationContext()拿到ApplicationContext
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(MatCommandHandler.class);
    }

    @Override
    public void execute (Integer id) {
        handler.delMaterialApplication(id);
    }
}
